public class ZhaiZhiJie04 {
    public static void main(String[] args) {
        Math2 m = new Math2();
        try{
            System.out.println("除法操作：" + m.div(10,0));
        }catch(Exception e){
            //e.printStackTrace();
            System.out.println("异常产生："+e);
        }
    }
}

class Math2{
    public int div(int i, int j) throws Exception{
        System.out.println("计算开始");
        int temp = 0;
        try{
            temp = i / j;
        }catch(Exception e){
            throw e;
        }finally{
            System.out.println("计算结束");
        }
        return temp;
    }
}
